package cn.fungnotl.tank;

import java.io.IOException;
import java.util.Properties;

/**
 * @project tank
 * @auther fungnotl
 * @date 2020-01-22-23-31
 * @description:
 */
public class PropertyMgr {
    static Properties props = new Properties();

    static {
        try {
            props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public static Object get(String key){
        if (props == null){
            return null;
        }
        return props.get(key);
    }

    //int getInt(key)
    //getString(key)

    public static void main(String[] args) {
        System.out.println(PropertyMgr.get("initTankCount"));
    }
}
